<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>请假申请</title>
</head>
<script src="//unpkg.com/vue/dist/vue.js"></script>
<link rel="stylesheet"
	href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
<link rel="stylesheet"
	href="./resources/css/sweetalert2.css" />
<script src="//unpkg.com/element-ui/lib/index.js"></script>
<script src="./resources/js/jquery.min.js"></script>
<script src="./resources/js/sweetalert2.min.js"></script>
<body>
<div id="mainApp">
  <el-container style="padding-top:20px;">
	  <el-header style="heighe:10px;">
		  <el-row :gutter="24">
			<el-col :span="8" :xs="8" :sm="8" :md="8" :lg="8">
				<el-breadcrumb class="breadcrumb-inner">
					<el-breadcrumb-item><h2>请假申请</h2></el-breadcrumb-item>
				</el-breadcrumb>
			</el-col>
		  </el-row>
	  </el-header>
	  <el-main>
	  	  <el-card calss="box-card">
	  	  	<el-row :gutter="24">
		  		<el-col :span="8" :xs="8" :sm="8" :md="8" :lg="8">
		  			<span><h4>请假申请</h4></span>
		  		</el-col>
		  	</el-row>
		  </el-card>
		  <el-card>
		  	<el-form>
			  <el-form-item label="申请信息">
			    <el-input v-model="reason" placeholder="申请信息"></el-input>
			  </el-form-item>
			  <el-form-item>
			    <el-button type="primary" @click="startApprove">申请</el-button>
			  </el-form-item>
			</el-form>
		  </el-card>
	  </el-main>
  </el-container>
</div>
</body>
<script>
new Vue({
		el:"#mainApp",
	    data:{
	    	reason:""
	    },
	    mounted:function(){
	    },
	    methods: {
	      startApprove(){
			  var _this = this;
			  $.post("appro/startApprove",{
				  reason:this.reason
			  }, function(data) {
				  if(data.code=="1"){
					  swal("申请成功!");
					  this.reason="";
				  }
				  console.log(data);
	    	  });
		  }
	    }
	  });
</script>
</html>